home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Programming / MuManual / Include / clib / mmu_protos.h < prev   
C/C++ Source or Header  |  2000-03-25  |  5KB  |  105 lines

  1. /*************************************************************************
  2.  ** mmu.library                                                         **
  3.  **                                                                     **
  4.  ** a system library for arbitration and control of the MC68K MMUs      **
  5.  **                                                                     **
  6.  ** © 1998-2000 THOR-Software, Thomas Richter                           **
  7.  ** No commercial use, reassembly, modification without prior, written  **
  8.  ** permission of the authors.                                          **
  9.  ** Including this library in any commercial software REQUIRES a        **
  10.  ** written permission and the payment of a small fee.                  **
  11.  **                                                                     **
  12.  **---------------------------------------------------------------------**
  13.  ** mmu.library prototypes                        **
  14.  ** Version 42.0        24.03.2000                **
  15.  *************************************************************************/
  16.  
  17. #ifndef CLIB_MMU_PROTOS_H
  18. #define CLIB_MMU_PROTOS_H
  19.  
  20. #ifndef EXEC_LISTS_H
  21. #include <exec/lists.h>
  22. #endif
  23.  
  24. #ifndef UTILITY_TAGITEM_H
  25. #include <utility/tagitem.h>
  26. #endif
  27.  
  28. #ifndef MMU_CONTEXT_H
  29. #include <mmu/context.h>
  30. #endif
  31.  
  32. void *AllocAligned(ULONG bytesize,ULONG reqments,ULONG alignment);
  33. struct MinList *GetMapping(struct MMUContext *);
  34. void ReleaseMapping(struct MMUContext *,struct MinList *);
  35. void SetPropertyList(struct MMUContext *,struct MinList *);
  36. void TouchPropertyList(struct MinList *);
  37. ULONG GetPageSize(struct MMUContext *);
  38. ULONG RemapSize(struct MMUContext *);
  39. char GetMMUType(void);
  40. void LockMMUContext(struct MMUContext *);
  41. void UnlockMMUContext(struct MMUContext *);
  42. LONG AttemptLockMMUContext(struct MMUContext *);
  43. void LockContextList(void);
  44. void UnlockContextList(void);
  45. LONG AttemptLockContextList(void);
  46. BOOL SetPropertiesA(struct MMUContext *,ULONG flags,ULONG mask,ULONG lower,
  47.     ULONG size,struct TagItem *tags);
  48. BOOL SetProperties(struct MMUContext *,ULONG flags,ULONG mask,ULONG lower,
  49.     ULONG size,unsigned long tag1type, ... );
  50. ULONG GetPropertiesA(struct MMUContext *,ULONG lower,struct TagItem *tags);
  51. ULONG GetProperties(struct MMUContext *,ULONG lower,
  52.     unsigned long tag1type, ... );
  53. BOOL RebuildTree(struct MMUContext *);
  54. BOOL RebuildTreesA(struct MMUContext **);
  55. BOOL RebuildTrees(struct MMUContext *, ... );
  56. BOOL SetPagePropertiesA(struct MMUContext *,ULONG flags,ULONG mask,
  57.     ULONG lower,struct TagItem *tags);
  58. BOOL SetPageProperties(struct MMUContext *,ULONG flags,ULONG mask,
  59.     ULONG lower,unsigned long tag1type, ... );
  60. ULONG GetPagePropertiesA(struct MMUContext *,ULONG lower,
  61.     struct TagItem *tags);
  62. ULONG GetPageProperties(struct MMUContext *,ULONG lower,
  63.     unsigned long tag1type, ... );
  64. struct MMUContext *CreateMMUContextA(struct TagItem *tags);
  65. struct MMUContext *CreateMMUContext(unsigned long tag1type, ... );
  66. BOOL DeleteMMUContext(struct MMUContext *);
  67. void *AllocLineVec(ULONG bytesize,ULONG reqments);
  68. ULONG PhysicalPageLocation(struct MMUContext *,ULONG logical);
  69. struct MMUContext *SuperContext(struct MMUContext *);
  70. struct MMUContext *DefaultContext(void);
  71. struct MMUContext *CurrentContext(struct Task *);
  72. struct MMUContext *EnterMMUContext(struct MMUContext *,struct Task *);
  73. struct MMUContext *LeaveMMUContext(struct Task *);
  74. struct ExceptionHook *AddContextHookA(struct TagItem *tags);
  75. struct ExceptionHook *AddContextHook(unsigned long tag1type, ... );
  76. void RemContextHook(struct ExceptionHook *);
  77. struct ExceptionHook *AddMessageHookA(struct TagItem *tags);
  78. struct ExceptionHook *AddMessageHook(unsigned long tag1type, ... );
  79. void RemMessageHook(struct ExceptionHook *);
  80. void ActivateException(struct ExceptionHook *);
  81. void DeactivateException(struct ExceptionHook *);
  82. void DMAInitiate(struct MMUContext *,void **,ULONG *,BOOL);
  83. void DMATerminate(struct MMUContext *);
  84. ULONG PhysicalLocation(struct MMUContext *,void **,ULONG *);
  85. ULONG WithoutMMU(unsigned long (*userFunction)() );
  86. ULONG RunOldConfig(unsigned long (*userFunction)() );
  87. void SetBusError(void (*handler)(), void (**oldhandler)() );
  88. ULONG GetMMUContextData(struct MMUContext *,ULONG tag_id );
  89. void SetMMUContextDataA(struct MMUContext *,struct TagItem * );
  90. void SetMMUContextData(struct MMUContext *, unsigned long tag1type , ... );
  91. struct MinList *NewMapping(void);
  92. BOOL CopyMapping(struct MinList *, struct MinList *,ULONG base,ULONG len,ULONG mask);
  93. struct MinList *DupMapping(struct MinList *);
  94. BOOL CopyContextRegion(struct MMUContext *, struct MinList *,ULONG base,ULONG len,ULONG mask);
  95. BOOL SetPropertiesMapping(struct MMUContext *, struct MinList *,ULONG base,ULONG len,ULONG mask);
  96. int SetMappingPropertiesA(struct MinList *,ULONG flags,ULONG mask,ULONG lower,ULONG size,struct TagItem *);
  97. int SetMappingProperties(struct MinList *,ULONG flags,ULONG mask,ULONG lower,ULONG size,unsigned long tag1type, ... );
  98. ULONG GetMappingPropertiesA(struct MinList *,ULONG lower,struct TagItem *);
  99. ULONG GetMappingProperties(struct MinList *,ULONG lower,unsigned long tag1type,...);
  100. ULONG BuildIndirect(struct MMUContext *,ULONG adr,ULONG props);
  101. void SetIndirect(ULONG *dest,ULONG logical, ULONG desc);
  102. void SetIndirectArray(ULONG *dest,ULONG *descr,ULONG num);
  103. void GetIndirect(struct MMUContext *,struct AbstractDescriptor *,ULONG *addr);
  104. #endif
  105.